<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css的权重问题</title>
    <style>
        #back{
            width: 100px;
            height: 100px;
            background-color: black;
        }
        .back{
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
<div class="back" id="back"></div>

<script>
    /*经过测试id的权重果然比class的大*/
</script>
</body>
</html>